import request from '@/common/request'

export function lianjieshuju (data) {
  return request({
    url: '/api/auth/send',
    method: 'post',
    data
  })
}

export function getparam (data) {
  return request({
    url: '/api/auth/get/param',
    method: 'post',
    timeout: 300000,
    data
  })
}

export function setparam (data) {
  return request({
    url: '/api/auth/set/param',
    method: 'post',
    timeout: 300000,
    data
  })
}

// 日志分页
export function rizhifenye (data) {
  return request({
    url: '/api/log/page',
    method: 'post',
    data
  })
}
// 设置预警
export function shezhiyujing (data) {
  return request({
    url: '/api/config',
    method: 'post',
    data
  })
}
// 获取预警
export function huoquyujing (query) {
  return request({
    url: '/api/config',
    method: 'get',
    params: query
  })
}

// 示波器测试上传
export function shangchuanshiboqiwenjian (data) {
  console.log(data)
  return request({
    url: '/api/file/saveSqlFile',
    method: 'post',
    data
  })
}

// 示波器文件列表
export function huoqushiboqiwenjian (query) {
  return request({
    url: '/api/file/getFileList',
    method: 'get',
    params: query
  })
}

//获取通道
export function huoqutongdao (id) {
  return request({
    url: '/api/file/getTdList/'+id,
    method: 'get'
  })
}

//获取通道
export function huoqushuju (id,tongdao) {
  return request({
    url: '/api/file/getTdInfo/'+id+'/'+tongdao,
    method: 'get'
  })
}
